<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改模型管理')" />
    <th:block th:include="include :: summernote-css" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-model-edit" th:object="${rModel}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">启动文件名：</label>
                <div class="col-sm-8">
                    <textarea name="startName"  class="form-control">[[*{startName}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">预览URL：</label>
                <div class="col-sm-8">
                    <textarea name="url" class="form-control">[[*{url}]]</textarea>
                </div>
            </div>

            <div class="form-group">
                <label class="font-noraml">上传模型文件</label>
                <input id="fileUploadPic" type="file"  name="file" >
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">模型文件：</label>
                <div class="col-sm-8">
                    <textarea name="path" id="picUrl" class="form-control">[[*{path}]]</textarea>
                </div>
            </div>

            <div class="form-group">
                <label class="font-noraml">上传conda文件</label>
                <input id="fileUploadWord" type="file"  name="file" >
            </div>
            <div class="form-group" >
                <label class="col-sm-2 control-label is-required">选择默认conda文件：</label>
                <div class="col-sm-8">
                    <select  name="defaultCondaPath"  class="form-control" >
                        <option value="">--请选择conda文件--</option>
                        <option th:each="item:${@dict.getType('default_conda_path')}" th:value="${item.getDictValue()}" >[[${item.getDictValue()}]]</option>
                    </select>
                </div>

            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">conda文件：</label>
                <div class="col-sm-8">
                    <textarea name="condaPath" id="wordUrl" class="form-control">[[*{condaPath}]]</textarea>
                </div>
            </div>



        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js" />
    <th:block th:include="include :: importFileUpLoad" />
    <script th:inline="javascript">
        var prefix = ctx + "system/model";
        $("#form-model-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-model-edit').serialize());
            }
        }
    </script>
</body>
</html>